<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./demo.css">
</head>
<body>
    <div class="wrap wrap1">
        <div class="top">
           <ul>
               <li class="active">1</li>
               <li>2</li>
               <li>3</li>
           </ul>
        </div>
        <div class="bottom">
            <ul>
                <li class="active">1</li>
                <li>2</li>
                <li>3</li>
            </ul>
        </div>
    </div>

    <div class="wrap wrap2">
        <div class="top">
           <ul>
               <li class="active">1</li>
               <li>2</li>
               <li>3</li>
           </ul>
        </div>
        <div class="bottom">
            <ul>
                <li class="active">1</li>
                <li>2</li>
                <li>3</li>
            </ul>
        </div>
    </div>

    <div class="wrap wrap3">
        <div class="top">
           <ul>
               <li class="active">1</li>
               <li>2</li>
               <li>3</li>
           </ul>
        </div>
        <div class="bottom">
            <ul>
                <li class="active">1</li>
                <li>2</li>
                <li>3</li>
            </ul>
        </div>
    </div>
    <script src="./utils.js"></script>
    <script>
// 构造了自定义函数只要通过new语法就可以直接得到
   let tab1 = new Tab('.wrap1')
   let tab2 = new Tab('.wrap2')
   let tab3 = new Tab('.wrap3')


/* 
栈                   堆
Tab.prototype 地址1  地址1{自定义数据：init()   底层数据：constructor  __proto__} 
tab1          地址2  地址2{自定义数据：el   __proto__}  
tab2          地址3  地址3{自定义数据：el   __proto__}  
*/


</script>

</body>
</html>